import request from "@/utils/request"
const BASE_URL = process.env.VUE_APP_BASE_URL

/**
 * 修改头像
 * @param {*} data
 */
export function adminUsersUpdateImgAPI(data) {
	return request({
		url: BASE_URL + "adminUser/updateImg",
		method: "post",
		data: data,
		headers: {
			"Content-Type": "multipart/form-data"
		}
	})
}

/**
 * 个人详情
 * @param {*} data
 */
export function adminUsersReadAPI(data) {
	return request({
		url: BASE_URL + "adminUser/queryLoginUser",
		method: "post",
		data: data
	})
}

/**
 * 修改个人信息
 * @param {*} data
 */
export function adminUsersUpdateAPI(data) {
	return request({
		url: BASE_URL + "adminUser/updateUser",
		method: "post",
		data: data,
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		}
	})
}

/**
 * 修改密码
 * @param {*} data
 */
export function adminUsersResetPasswordAPI(data) {
	return request({
		url: BASE_URL + "adminUser/updatePassword",
		method: "post",
		data: data
	})
}

/**
 * 查询用户语言列表
 * @param {*} data
 */
export function adminUsersQueryLanguageListAPI(data) {
	return request({
		url: BASE_URL + "adminUser/queryUserLanguageList",
		method: "post",
		data: { ...data, languagePackType: 1 },
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		}
	})
}

/**
 * 查询用户默认语言
 * @param {*} data
 */
export function adminUsersQueryDeflautLanguageAPI(data) {
	return request({
		url: BASE_URL + "adminUser/queryUserDeflautLanguage",
		method: "post",
		data: { ...data, languagePackType: 1 },
		headers: {
			"Content-Type": "application/json;charset=UTF-8"
		}
	})
}

/**
 * 设置用户默认语言
 * @param {*} data
 */
export function adminUsersSetDeflautLanguageAPI(data) {
	return request({
		url: BASE_URL + "adminUser/updateUserDeflautLanguage",
		method: "post",
		data: data
	})
}
